//
//  ZZnetworking.h
//  iosYunyue
//
//  Created by mac on 16/4/8.
//  Copyright © 2016年 zhanlijun. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface ZZnetworking : NSObject



/**
 *JSON方式post提交数据
 *urlStr:服务器地址
 *parameters:提交的内容参数
 *
 */
+ (void)postJSONWithUrl:(NSString *)urlStr parameters:(id)parameters success:(void (^)(id responseObject))success fail:(void (^)())fail;

/**
 *  get获得json数据
 *
 *  @param urlStr     <#urlStr description#>
 *  @param parameters <#parameters description#>
 *  @param success    <#success description#>
 *  @param fail       <#fail description#>
 *  @param urlStr     <#urlStr description#>
 *  @param success    <#success description#>
 *  @param fail       <#fail description#>
 */
+ (void)getdataWithUrl:(NSString *)urlStr parameters:(id)parameters success:(void (^)(id responseObject))success fail:(void (^)())fail;

/**
 *  自己封装的 上传图片的
 *
 *  @param urlStr     <#urlStr description#>
 *  @param parameters <#parameters description#>
 *  @param imageData  <#imageData description#>
 *  @param success    <#success description#>
 *  @param fail       <#fail description#>
 */
+ (void)postJSONWithUrl:(NSString *)urlStr parameters:(id)parameters imagedata:(NSData *)imageData success:(void (^)(id responseObject))success fail:(void (^)())fail;


+ (void)postJSONWithUrl:(NSString *)urlStr parameters:(id)parameters imageArray:(NSArray *)imageArray success:(void (^)(id responseObject))success fail:(void (^)())fail;

/**
 *  可以自定义上传图片类型
 *
 *  @param urlStr     <#urlStr description#>
 *  @param parameters <#parameters description#>
 *  @param imageData  <#imageData description#>
 *  @param imagename  <#imagename description#>
 *  @param success    <#success description#>
 *  @param fail       <#fail description#>
 */
+ (void)postJSONWithUrl:(NSString *)urlStr parameters:(id)parameters imagedata:(NSData *)imageData imagename:(NSString *)imagename success:(void (^)(id responseObject))success fail:(void (^)())fail;

@end
